package com.guosifan.feign;

import com.guosifan.entity.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient(value = "user")
public interface UserClientFeign {

    @GetMapping("/user/findAll")
    public List<User> findAll(@RequestParam int index,@RequestParam int limit);

    @GetMapping("/user/count")
    public int count();

    @PostMapping("/user/save")
    public int save( User user);

    @GetMapping("/user/deleteById/{id}")
    public int deleteById(@PathVariable("id") int id);

}
